package com.moli.iov.admin.mq.activemq;

import com.moli.iov.admin.model.dto.WebSocketDto;
//import com.moli.iov.admin.websocket.handle.WebSocketBizHandler;
import com.moli.iov.admin.websocket.handle.WebSocketBizHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;

import java.util.HashSet;

/**
 * <p>
 *  延时消息处理
 * </p>
 *
 * @Auther: lws
 * @Date: 2018/11/27 10:40
 */

@Component
public class MessageHandler {

    protected final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    WebSocketBizHandler webSocketBizHandler;

    /**
     * 指令延时消息业务处理
     * @param webSocketDto
     */
    public void handle(WebSocketDto webSocketDto){
        try {

            webSocketBizHandler.send(webSocketDto);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }



}
